package com.nlx.notes.support.context;

import com.nlx.notes.module.bean.dto.context.UserContext;

import java.util.ArrayList;

public class UserHolder {

    private static final ThreadLocal<UserContext> USER_CONTEXT = new ThreadLocal<>();


    public static void setUserContext(UserContext user) {
        USER_CONTEXT.set(user);
    }

    public static UserContext getUserContext() {
        return USER_CONTEXT.get();
    }

    public static void removeUserContext() {
        USER_CONTEXT.remove();
    }




}
